home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20010306-20010921
/
000311_fdc@watsun.cc.columbia.edu_Tue Aug 14 10:51:39 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
4KB
|
98 lines
Article: 12670 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Kermit Scripts and Shell Scripts
Date: 14 Aug 2001 14:51:02 GMT
Organization: Columbia University
Lines: 81
Message-ID: <9lbdsm$35j$1@newsmaster.cc.columbia.edu>
References: <336f652d.0108130841.43ce0ed5@posting.google.com> <9l909g$bse$1@newsmaster.cc.columbia.edu> <336f652d.0108140545.1a1c8658@posting.google.com>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 997800662 3251 128.59.39.2 (14 Aug 2001 14:51:02 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 14 Aug 2001 14:51:02 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12670
In article <336f652d.0108140545.1a1c8658@posting.google.com>,
Shifeux <shifeux@hotmail.com> wrote:
: I am using: C-Kermit 7.0.197, 8 Feb 2000, for Data General DG/UX
: R4.20 I am trying to call the perl script from within an IF statement
: using the "run" command (I also toyed around with "exec") The perl
: does work fine by itself. It seems like the IF construct is causing
: the Kermit script to crash at the point of the run command. When I
: comment out the IF statement the script runs fine. I have tried
: various different things but nothing will let this run command run.
: Here is a listing of the latest try at the if statement.
:
: if failure timeout
:
: minput 10 {No files found} {Total of}
: switch \v(minput) {
: :1, if failure write TRANSACTION-LOG Files Found\13\10, define
: \%o 1, br
: eak
: :2, cp /kermit_scripts/\%r.termlog
: /cleoa+/kermit_scripts/\%r.files, break
: }
: run /kermit_scripts/xxxxxxx.pl, pause 5, -
: define \%o 1, break
:
:
: input 10 {choice : }
: if failure timeout
:
OK, this is all fractured and hard to read; I assume you're not trying to
run a fractured original.
"run /kermit_scripts/xxxxxxx.pl" should work if the xxxxxxx.pl file contains
a first line that looks like:
#!/usr/bin/perl
and it has execute permission:
1. Can you run it from the shell prompt by typing its name?
2. If so, can you run it from Kermit by typing
"run /kermit_scripts/xxxxxxx.pl" at the C-Kermit> prompt?
Assuming the answer to both is yes, let's try to reconstruct your
fractured script:
minput 10 {No files found} {Total of}
switch \v(minput) {
:1, if failure write TRANSACTION-LOG Files Found\13\10
define \%o 1
break
:2, cp /kermit_scripts/\%r.termlog /cleoa+/kermit_scripts/\%r.files
break
}
run /kermit_scripts/xxxxxxx.pl
pause 5
define \%o 1
break
Well, it's a bit confusing. The RUN command looks like it should be
a SWITCH clause (because of the BREAK) but it's outside the SWITCH
statement. What's the BREAK for? And which IF statement are you talking
about, that causes the script to crash? The only one I see is the IF FAILURE
in case 1 of the SWITCH (which doesn't make much sense). Does the following
make more sense?
minput 10 {No files found} {Total of}
if failure stop 1 MINPUT timed out.
switch \v(minput) {
:1, writeln TRANSACTION-LOG Files Not Found
define \%o 1
break
:2, cp /kermit_scripts/\%r.termlog /cleoa+/kermit_scripts/\%r.files
run /kermit_scripts/xxxxxxx.pl
pause 5
define \%o 1
break
}
- Frank